<template>
  <div>
    <div>
      <div class="search-box">
        <tiny-input type="text" v-model="data.search" placeholder="搜索" @keyup.enter="search">
          <template #suffix>
            <yu-icon @click="search" iconName="chaxun" class="search-icon" />
          </template>
        </tiny-input>
      </div>
    </div>
    <ul class="nav-class">
      <li v-for="item in data.nav">{{ item.name }}</li>
    </ul>
  </div>
</template>

<script setup>
  import { reactive, ref, getCurrentInstance } from 'vue';
  import { cosSystem } from '@/stores/system';
  let store = cosSystem();

  const data = reactive({ nav: [] });

  data.nav = [
    { name: '都市', url: 'http://' },
    { name: '都市1', url: 'http://' },
    { name: '玄幻', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
    { name: '异界', url: 'http://' },
  ];
</script>

<style lang="scss" scoped>
  .nav-class {
    width: 80%;
    background: #0a2572;
    height: 50px;
    padding-left: 20%;
    line-height: 50px;

    li {
      display: inline;
      padding: 0 15px;
      cursor: pointer;
      color: #ffffff;
      font-weight: 400;
    }
    li:hover {
      color: #e91a1a;
    }
  }
</style>
